<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin:0x;
            padding:0px;
        }
        div{
            width:1200px;
            height:300px;
            background-color: #ccc;
        }
        div p{
            width: 300px;
            height: 200px;
            background-color: red;
            margin-right: 50px;
            float:left;
        }
        @media screen and (min-width: 700px) and (max-width: 800px){
            *{
                margin:0px;
                padding:0px;
            }
            div{
                width:700px;
                height: 300px;
                background-color: pink;
            }
            div p{
                width: 150px;
                height: 150px;
                background-color: blue;
            }
        }
        @media screen and (min-width: 400px) and (max-width: 700px){
            *{
                margin:0px;
                padding:0px;
            }
            div{
                width:400px;
                height: 300px;
                background-color: rgb(250, 101, 126);
            }
            div p{
                width: 100px;
                height: 100px;
                background-color: rgb(106, 235, 252);
            }
        }
        @media screen and (max-width: 400px){
            *{
                margin:0px;
                padding:0px;
            }
            div{
                width:300px;
                height: 300px;
                background-color: rgb(75, 4, 16);
            }
            div p{
                width: 80px;
                height: 80px;
                background-color: rgb(2, 56, 63);
                margin-right: 10px;
                float:left;
            }
        }
    </style>
</head>
<body>
    <div>
        <p></p>
        <p></p>
        <p></p>
    </div>
</body>
</html>